package xin.marcher.module.inventory.domain.bo;

import lombok.Data;
import xin.marcher.module.inventory.domain.entity.InventoryBucketConfigDO;

import java.util.List;

/**
 * 本地分桶缓存相关信息
 *
 *
 */
//@Data
public class BucketLocalCache {

    /**
     * 商品skuID
     */
    private String skuId;

    /**
     * 卖家ID
     */
    private String sellerId;

    /**
     * 中心桶库存
     */
    private Integer inventoryNum;

    /**
     * 中心桶剩余库存
     */
    private Integer residueNum;

    /**
     * 本地元数据对应的版本号
     */
    private String version;

    /**
     * 操作类型，0上线，1下线
     */
    private Integer operationType;

    /**
     * 当前分桶的配置信息
     */
    private InventoryBucketConfigDO inventoryBucketConfig;

    /**
     * 分桶明细缓存key
     */
    private List<String> bucketDetailKeyList;

    /**
     * 可用分桶缓存列表
     */
    private List<BucketCacheBO> availableList;

    /**
     * 未分配或者已下线的分桶缓存列表
     */
    private List<BucketCacheBO> undistributedList;

    /**
     * 默认的缓存对象
     *
     * @return
     */
    public String getBucketLocalKey() {
        return sellerId + skuId;
    }

    public String getSkuId() {
        return skuId;
    }

    public void setSkuId(String skuId) {
        this.skuId = skuId;
    }

    public String getSellerId() {
        return sellerId;
    }

    public void setSellerId(String sellerId) {
        this.sellerId = sellerId;
    }

    public Integer getInventoryNum() {
        return inventoryNum;
    }

    public void setInventoryNum(Integer inventoryNum) {
        this.inventoryNum = inventoryNum;
    }

    public Integer getResidueNum() {
        return residueNum;
    }

    public void setResidueNum(Integer residueNum) {
        this.residueNum = residueNum;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public Integer getOperationType() {
        return operationType;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }

    public InventoryBucketConfigDO getInventoryBucketConfig() {
        return inventoryBucketConfig;
    }

    public void setInventoryBucketConfig(InventoryBucketConfigDO inventoryBucketConfig) {
        this.inventoryBucketConfig = inventoryBucketConfig;
    }

    public List<String> getBucketDetailKeyList() {
        return bucketDetailKeyList;
    }

    public void setBucketDetailKeyList(List<String> bucketDetailKeyList) {
        this.bucketDetailKeyList = bucketDetailKeyList;
    }

    public List<BucketCacheBO> getAvailableList() {
        return availableList;
    }

    public void setAvailableList(List<BucketCacheBO> availableList) {
        this.availableList = availableList;
    }

    public List<BucketCacheBO> getUndistributedList() {
        return undistributedList;
    }

    public void setUndistributedList(List<BucketCacheBO> undistributedList) {
        this.undistributedList = undistributedList;
    }
}
